﻿using System;

class FloatComparator
{
    /*
        Write a program that safely compares floating-point numbers with precision of 0.000001. 
        Examples:(5.3 ; 6.01)  false;  (5.00000001 ; 5.00000003)  true
    */

    static void Main(string[] args)
    {
        double a = 5.3;
        double b = 6.01;
        bool result1 = limitedCompare(a, b);
        Console.WriteLine(result1);
           
        double c = 5.000000001;
        double d = 5.000000003;
        bool result2 = limitedCompare(c, d);
        Console.WriteLine(result2);
    }

    static bool limitedCompare(double first, double second)
    {
        return Math.Round(first, 6) == Math.Round(second, 6);
    }
}
